<?php $this->fetch('public/head') ?>
<div class="layui-tab layui-tab-brief">
    <ul class="layui-tab-title">
        <li class="layui-this">信息列表</li>
        <!-- <li class=""><a href="<?php echo url('add') ?>">添加信息</a></li> -->
    </ul>
    <div class="layui-tab-content">
        <form class="layui-form layui-form-pane" action="" method="get">
            <div class="layui-inline">
                <label class="layui-form-label">姓名关键词</label>
                <div class="layui-input-inline">
                    <input type="text" name="title" value="<?php echo input('title') ?>" placeholder="请输入关键词" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <button class="layui-btn">搜索</button>
<!--                <a href="--><?php //echo url('downloads') ?><!--"><div style="display: inline-block;-->
<!--    height: 38px;-->
<!--    line-height: 38px;-->
<!--    padding: 0 18px;-->
<!--    background-color: #009688;-->
<!--    color: #fff;-->
<!--    white-space: nowrap;-->
<!--    text-align: center;-->
<!--    font-size: 14px;-->
<!--    border: none;-->
<!--    border-radius: 2px;-->
<!--    cursor: pointer;">导出EXCEL表格</div>-->
            </div>
        </form>
        <hr>
            <div class="layui-input-block">
            </div>
        </form>
        <hr>

        <form action="" method="post" class="ajax-form">
            选中项：
            <!-- <button type="button" class="layui-btn layui-btn-danger layui-btn-small ajax-action" data-action="<?php echo url('delete?id='.$v['id']) ?>">删除</button> -->
            <div class="layui-tab-item layui-show">
                <table class="layui-table">
                    <thead>
                    <tr>
                        <th style="width: 30px;">ID</th>
                        <th>姓名</th>
                        <th>邮箱</th>
                        <th>手机</th>
                        <th>毕业院校</th>
                        <th>专业</th>
                        <th>更新时间</th>
                        <th>审阅状态</th>
                        <th>面试状态</th>
                        <th>录用状态</th>                       
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach($list as $v): ?>
                    <tr>
                        <td><?php echo $v['id'] ?></td>
                        <td><?php echo $v['name'] ?></td>
                        <td><?php echo $v['email'] ?></td>
                        <td><?php echo $v['tel'] ?></td>
                        <td><?php echo $v['school'] ?></td>
                        <td><?php echo $v['specialty'] ?></td>
                        <td><?php echo $v['update_time'] ?></td>
                        <td>
                            <a href="<?php echo url('status?id='.$v['id']) ?>" data-param="status=0" class="layui-btn 
                                <?php if ($v['status'] == 0): ?>
                                    layui-btn-danger
                                <?php endif ?>
                             layui-btn-xs ajax-post">未审阅</a>
                            <a href="<?php echo url('status?id='.$v['id']) ?>" data-param="status=1" class="layui-btn
                                <?php if ($v['status'] == 1): ?>
                                    layui-btn-danger
                                <?php endif ?> 
                            layui-btn-xs ajax-post">已审阅</a>
                        </td>
                        <td>
                            <a href="<?php echo url('status1?id='.$v['id']) ?>" data-param="status1=0" class="layui-btn 
                                <?php if ($v['status1'] == 0): ?>
                                    layui-btn-danger
                                <?php endif ?>
                             layui-btn-xs ajax-post">未面试</a>
                            <a href="<?php echo url('status1?id='.$v['id']) ?>" data-param="status1=1" class="layui-btn
                                <?php if ($v['status1'] == 1): ?>
                                    layui-btn-danger
                                <?php endif ?> 
                            layui-btn-xs ajax-post">已面试</a>
                        </td>
                        <td>
                            <a href="<?php echo url('status2?id='.$v['id']) ?>" data-param="status2=0" class="layui-btn 
                                <?php if ($v['status2'] == 0): ?>
                                    layui-btn-danger
                                <?php endif ?>
                             layui-btn-xs ajax-post">未录用</a>
                            <a href="<?php echo url('status2?id='.$v['id']) ?>" data-param="status2=1" class="layui-btn
                                <?php if ($v['status2'] == 1): ?>
                                    layui-btn-danger
                                <?php endif ?> 
                            layui-btn-xs ajax-post">已录用</a>
                            <a href="<?php echo url('status2?id='.$v['id']) ?>" data-param="status2=2" class="layui-btn 
                                <?php if ($v['status2'] == 2): ?>
                                    layui-btn-danger
                                <?php endif ?>
                            layui-btn-xs ajax-post">备选</a>
                        </td>
                        <td>
                            <a href="<?php echo url('edit?id='.$v['id']) ?>" class="layui-btn layui-btn-normal layui-btn-xs">查看</a>
                            <?php if($v['status_tel']==0): ?>
                            <a href="<?php echo url('flag?id='.$v['id']) ?>" data-param="status_tel=1" class="layui-btn layui-btn-xs ajax-post">信息正常</a> 
                            <?php else: ?>
                            <a href="<?php echo url('flag?id='.$v['id']) ?>" data-param="status_tel=0" class="layui-btn layui-btn-danger layui-btn-xs ajax-post">信息有误</a>
                            <?php endif; ?>
                            <a href="<?php echo url('delete?id='.$v['id']) ?>" class="layui-btn layui-btn-danger layui-btn-xs ajax-delete">删除</a>
                        </td>
                    </tr>
                    <?php endforeach; ?>
                    </tbody>
                </table>
                <!--分页-->
                <?php echo $list->render() ?>
            </div>
        </form>
    </div>
</div>

<?php $this->fetch('public/script') ?>

<script>
    $('.code').click(function(){
        layer.alert('http://zl.huisheng.com/index/order/qd/nid/'+$('.code').data('val')+'.html');
    })
</script>
